//package com.jc.order.service.impl;
//
//import com.jc.order.domain.QuotaApply;
//import com.jc.order.dto.QuotaApplyDTO;
//import com.jc.order.mapper.QuotaApplyMapper;
//import com.jc.order.service.QuotaApplyService;
//import org.springframework.beans.BeanUtils;
//import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Transactional;
//import tk.mybatis.mapper.entity.Example;
//
//import javax.annotation.Resource;
//
//
//@Service
//public class QuotaApplyServiceImpl implements QuotaApplyService {
//
//
//    @Resource
//    private QuotaApplyMapper quotaApplyMapper;
//
////
////    @Override
////    @Transactional
////    public QuotaApplyDTO createQuotaApply(QuotaApplyDTO dto) {
////        if (dto == null) {
////            return null;
////        }
////        QuotaApply entity = new QuotaApply();
////        BeanUtils.copyProperties(dto, entity);
////        quotaApplyMapper.insert(entity);
////        dto.setApplyId(entity.getId());
////        return dto;
////    }
////
////    @Override
////    @Transactional
////    public Boolean updateQuotaApply(String corpserialNo, QuotaApplyDTO dto) {
////        QuotaApply entity = new QuotaApply();
////        BeanUtils.copyProperties(dto, entity);
////        int row = quotaApplyMapper.updateByPrimaryKey(entity);
////        return row > 0;
////    }
////
////    @Override
////    public QuotaApplyDTO getBySerialNo(String corpserialNo, Long tenantId) {
////        QuotaApplyDTO dto = null;
////        Example example = new Example(QuotaApply.class, Boolean.TRUE, Boolean.TRUE);
////        example.createCriteria().andEqualTo("tenantId", tenantId);
////        example.createCriteria().andEqualTo("corpserialNo", corpserialNo);
////        QuotaApply quotaApply = quotaApplyMapper.selectOneByExample(example);
////        if (quotaApply != null) {
////            dto = new QuotaApplyDTO();
////            BeanUtils.copyProperties(quotaApply, dto);
////        }
////        return dto;
////    }
////
////    @Override
////    public QuotaApplyDTO getByCompName(String compName, Long tenantId) {
////
////        QuotaApplyDTO dto = null;
////        Example example = new Example(QuotaApply.class, Boolean.TRUE, Boolean.TRUE);
////        example.createCriteria().andEqualTo("tenantId", tenantId);
////        example.createCriteria().andEqualTo("riskCompName", compName);
////        QuotaApply quotaApply = quotaApplyMapper.selectOneByExample(example);
////        if (quotaApply != null) {
////            dto = new QuotaApplyDTO();
////            BeanUtils.copyProperties(quotaApply, dto);
////        }
////        return dto;
////    }
////
////    @Override
////    public QuotaApplyDTO getByRiskMark(String riskMark, Long tenantId) {
////
////        QuotaApplyDTO dto = null;
////        Example example = new Example(QuotaApply.class, Boolean.TRUE, Boolean.TRUE);
////        example.createCriteria().andEqualTo("tenantId", tenantId);
////        example.createCriteria().andEqualTo("riskMark", riskMark);
////        QuotaApply quotaApply = quotaApplyMapper.selectOneByExample(example);
////        if (quotaApply != null) {
////            dto = new QuotaApplyDTO();
////            BeanUtils.copyProperties(quotaApply, dto);
////        }
////        return dto;
////    }
//
//
//}
